#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(int argc, char *argv[])
{
    vector<int> vi{1, 2, 3, 4, 5, 6, 7};
    fill_n(vi.begin(), 3, 0);
    for (auto it : vi)
    {
        cout << it << " ";
    }
    cout << endl;

    fill(vi.begin(), vi.end(), -1);
    for (auto it : vi)
    {
        cout << it << " ";
    }
    cout << endl;
    return 0;
}
